<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<canvas id="canvas" width="300" height="300" style="border: 1px solid red;"></canvas>
	</body>
	<script type="text/javascript">
		var img = new Image;
		img.src = "img/company-2.png";
		
		img.addEventListener("load",drawText,false);
		
		function drawText(){
			var canvas = document.getElementById("canvas");
			var context = canvas.getContext("2d");
			
			var pattern = context.createPattern(img,"repeat");
			
			context.fillStyle = pattern;
			context.font = "bold 40px 微软雅黑";
			context.fillText("hellow world",100,50);
		}
		
		function draw(){
			
		}
	</script>
</html>
